package db.dbTables;

import core.objects.BaseObject;
import java.sql.ResultSet;
import java.sql.Types;
import java.util.ArrayList;
import java.util.List;

import db.queries.core.QueriesEnvironment;

/**
 *
 * @author ilanak
 */
public class UserCrossBookTable extends AbstractCrossDBTable{
	
    final public DbColumn id = new DbColumn("user_book_id",  Types.INTEGER, 11, false, this);
    final public DbColumn userId = new DbColumn("user_id",  Types.INTEGER, 11, false, this);
    final public DbColumn bookId = new DbColumn("book_id",  Types.INTEGER, 11, false, this);
  
    public UserCrossBookTable() {
        super("user_cross_book",
        		QueriesEnvironment.getUserTable(),
        		QueriesEnvironment.getBookTable());
        setIDColumn(id);
        setTable1IDColumn(userId);
        setTable2IDColumn(bookId);
    }
    
    @Override
	public List<DbColumn> getDbColumns(){
        List<DbColumn> list = new ArrayList<DbColumn>();
        list.add(id);
        list.add(userId);
        list.add(bookId);
        return list;
    }

    @Override
    public BaseObject convertSqlTableToBaseObject(ResultSet resultSet) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
}
